/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package models;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import tableModels.TableReservationModel;
import utils.Connexion;

/**
 *
 * @author juju
 */
public class UtilisateurMapper {
    private Connexion _connexion;
    
    public UtilisateurMapper() {
        try {
            this._connexion = new Connexion();
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(ReservationMapper.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(ReservationMapper.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public void connexion(String login, String password, Utilisateur utilisateur) {
        try {
            String requete = "SELECT * FROM projet.utilisateur WHERE login='" + login + "' AND password='" + password +"'";
            this._connexion.setQuery(requete);
            ResultSet resultat = this._connexion.getResultSet();
        } catch (SQLException ex) {
            Logger.getLogger(UtilisateurMapper.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public void save(Utilisateur utilisateur) {
        
    }
}
